Space polygon implements a polygon. It works best for convex polygon. In 3D, and additional HEIGHT can be specified to describe a generalized cylinder of axis Z, that has the 2D polygon as cross-section.
The coordinates of the polygon are read from a file.
|
|
| SpacePolygon (const SpaceProp *, std::string const &file) |
| | creator
|
| |
|
| ~SpacePolygon () |
| | destructor
|
| |
|
Vector | extension () const |
| | maximum extension along each axis
|
| |
|
real | volume () const |
| | the volume inside
|
| |
|
bool | inside (const real point[]) const |
| | true if the point is inside the Space
|
| |
|
void | project (const real point[], real proj[]) const |
| | project point on the closest edge of the Space
|
| |
| void | setInteraction (Vector const &pos, PointExact const &, Meca &, real stiff) const |
| | apply a force directed towards the edge of the Space More...
|
| |
|
void | setInteraction (Vector const &pos, PointExact const &, real rad, Meca &, real stiff) const |
| | apply a force directed towards the edge of the Space
|
| |
| void | resize () |
| | update since length have changed More...
|
| |
|
bool | display () const |
| | OpenGL display function, return true is display was done.
|
| |
|
| Space (const SpaceProp *p) |
| | constructor
|
| |
|
virtual | ~Space () |
| | destructor
|
| |
|
unsigned int | nbLengths () const |
| | number of dimensions defined by the user
|
| |
|
real | length (unsigned int d) const |
| | return dimension d
|
| |
|
real | length2 (unsigned int d) const |
| | return double dimension d
|
| |
|
real | lengthSqr (unsigned int d) const |
| | return squared dimension d
|
| |
|
void | readLengths (const std::string &) |
| | read dimensions from a stream
|
| |
| void | checkLengths (unsigned int required, bool positive) const |
| | check that required lengths have been specified More...
|
| |
|
void | resize (unsigned int d, real v) |
| | change dimension d to v, and update derived variables (this calls resize())
|
| |
| virtual bool | allInside (const real center[], real rad) const |
| | true if a sphere (center, radius) is entirely inside this Space More...
|
| |
| virtual bool | allOutside (const real center[], real rad) const |
| | true if a sphere (center, radius) is entirely outside this Space More...
|
| |
|
bool | outside (const real point[]) const |
| | true if point is outside this Space ( defined as !inside(point) )
|
| |
| void | project (const real point[], real proj[], real rad) const |
| | project point on this Space deflated by radius More...
|
| |
|
void | project (real point[]) const |
| | project point on edge of this Space, and return the result in point
|
| |
|
real | distanceToEdgeSqr (const real point[]) const |
| | the square of the distance to the edge of this Space
|
| |
|
real | distanceToEdge (const real point[]) const |
| | the distance to the edge, always positive
|
| |
|
real | signedDistanceToEdge (const real point[]) const |
| | the distance to the edge, positive if point is outside, and negative if inside
|
| |
| void | bounceInside (real w[]) const |
| | bounce the object off the wall to put it back inside More...
|
| |
| virtual Vector | normalToEdge (const real point[]) const |
| | a Vector perpendicular to the space edge at point, directed towards the outside More...
|
| |
| Vector | randomPlace () const |
| | a random position in the volume More...
|
| |
| virtual Vector | randomPlaceNearEdge (real rad) const |
| | a random position located at most at distance radius from the edge More...
|
| |
| Vector | randomPlaceOnEdge (real rad) const |
| | a random position located on the edge More...
|
| |
| virtual real | estimateVolume (unsigned long cnt) const |
| | estimate Volume using a poor Monte-Carlo method with cnt trials More...
|
| |
|
virtual void | step () |
| | one Monte-Carlo simulation step
|
| |
|
virtual void | setInteractions (Meca &) const |
| | add interactions to a Meca
|
| |
|
Tag | tag () const |
| | return unique character identifying the class
|
| |
|
const Property * | property () const |
| | return Object Property
|
| |
|
virtual void | read (InputWrapper &, Simul &) |
| | read from file
|
| |
|
virtual void | write (OutputWrapper &) const |
| | write to file
|
| |
|
Space * | next () const |
| | a static_cast<> of Node::next()
|
| |
|
Space * | prev () const |
| | a static_cast<> of Node::prev()
|
| |
|
void | displaySection (int dim, real pos, real step) const |
| | display the outline of a section of the box
|
| |
|
| Object () |
| | constructor
|
| |
| std::string | reference () const |
| | concatenation of [ tag(), property()->index(), number() ] in plain ascii More...
|
| |
| void | writeReference (OutputWrapper &) const |
| | write a reference that identifies the Object uniquely More...
|
| |
| void | writeReference (OutputWrapper &, Tag tag) const |
| | write a reference, but using the provided Tag More...
|
| |
|
int | mark () const |
| | birth mark value
|
| |
|
void | mark (int m) |
| | set birth mark
|
| |
|
int | fleck () const |
| | fleck value (not stored in trajectory files)
|
| |
|
void | fleck (int f) const |
| | set fleck (the value is not stored in trajectory files)
|
| |
|
Object * | next () const |
| | extends Node::next(), with a cast to preserve type
|
| |
|
Object * | prev () const |
| | extends Node::prev(), with a cast to preserve type
|
| |
|
| Node () |
| | constructor set as unlinked
|
| |
| virtual | ~Node () |
| | destructor More...
|
| |
|
bool | linked () const |
| | true if Node is linked
|
| |
|
Node * | next () const |
| | the next Node in the list, or zero if this is last
|
| |
|
Node * | prev () const |
| | the previous Node in the list, or zero if this is first
|
| |
|
NodeList * | list () const |
| | the list where the object is linked, or zero
|
| |
|
ObjectSet * | objset () const |
| | return associated ObjectSet
|
| |
|
| Inventoried () |
| | initialize (name=0)
|
| |
|
| ~Inventoried () |
| | destructor
|
| |
|
void | number (Number n) |
| | change the serial number
|
| |
|
Number | number () const |
| | serial number : a integer identifier, unique within each class
|
| |
|
| Movable () |
| | constructor
|
| |
|
virtual | ~Movable () |
| | destructor
|
| |
|
virtual Vector | position () const |
| | return the position in space of the object
|
| |
| virtual void | setPosition (Vector const &) |
| | move object to specified position More...
|
| |
|
virtual bool | translatable () const |
| | true if object accepts translations (default=false)
|
| |
| virtual void | translate (Vector const &) |
| | move the object ( position += given vector ) More...
|
| |
|
virtual bool | rotatable () const |
| | true if object accepts rotations (default=false)
|
| |
| virtual void | rotate (Rotation const &) |
| | rotate the object around the origin of coordinates More...
|
| |
| virtual void | rotateP (Rotation const &) |
| | rotate the object around its current position More...
|
| |
| virtual void | foldPosition (Modulo const *) |
| | perform modulo for periodic boundary conditions More...
|
| |
|
| static std::string | strReference (char, int, Number, int) |
| | build a string reference by concatenating (tag, property_index, number, mark) More...
|
| |
| static void | readReference (InputWrapper &, int &, Number &, int &, char pretag) |
| | read a reference (property_index, number, mark) from input More...
|
| |
|
static void | writeNullReference (OutputWrapper &) |
| | write a reference that does not refer to any Object
|
| |
| static Vector | readPrimitive (std::istream &, const Space *) |
| | read a position specified with primitives, such as 'circle 5', etc. More...
|
| |
| static Vector | readPosition (std::istream &, const Space *) |
| | read a position in space More...
|
| |
| static Vector | readDirection (std::istream &, const Vector &, const Space *) |
| | read an orientation, and return a normalized vector More...
|
| |
| static Rotation | readRotation (std::istream &, const Vector &, const Space *) |
| | read a rotation specified in is, at position pos More...
|
| |
|
const SpaceProp * | prop |
| | parameters
|
| |
|
static const Tag | TAG = 'e' |
| | a unique character identifying the class
|
| |
|
static const Tag | TAG = 'v' |
| | Object::TAG = 'v' represents the 'void' pointer.
|
| |
|
unsigned int | nLength |
| | number of dimensions defined in mLength[]
|
| |
|
real | mLength [DMAX] |
| | dimensions that define the geometry
|
| |
|
real | mLength2 [DMAX] |
| | double of each dimension
|
| |
|
real | mLengthSqr [DMAX] |
| | square of each dimension
|
| |
|
Node * | nNext |
| | the next Node in the list
|
| |
|
Node * | nPrev |
| | the previous Node in the list
|
| |
|
Number | nNumber |
| | object identifier, unique within the class defined by tag()
|
| |
|
static const unsigned int | DMAX = 8 |
| | max number of dimensions
|
| |